package com.darwin.darwinDisplay
{
	import flash.filters.BitmapFilter;

	/**
	 *	滤镜列表存储类 
	 * @author Roland
	 * 
	 */
	public class BitmapFilterList
	{
		private var _filtersVec:Vector.<BitmapFilter>;
		private var _filtersArr:Array;
		public function BitmapFilterList(...filters)
		{
			if(filters && filters.length > 0) setFiltersByArray(filters);
		}
		
		
		/**
		 *	对象包含的滤镜列表 (Vector形式)
		 */
		public function get filtersVec():Vector.<BitmapFilter>
		{
			return _filtersVec;
		}
		
		/**
		 *	 对象包含的滤镜列表 
		 * @return 
		 * 
		 */
		public function get filters():Array
		{
			return _filtersArr;
		}

		public function setFiltersByArray(filters:Array):void
		{
			_filtersArr = filters;
			_filtersVec = new Vector.<BitmapFilter>()
			for (var i:int = 0; i < _filtersArr.length; i++) 
			{
				_filtersVec.push(_filtersArr[i]);
			}
		}
		/**
		 * @private
		 */
		public function setFiltersByVector(value:Vector.<BitmapFilter>):void
		{
			_filtersVec = value;
			_filtersArr = [];
			for (var i:int = 0; i < _filtersVec.length; i++) 
			{
				_filtersArr.push(_filtersVec[i]);
			}
		}

	}
}